#include <iostream>

using namespace std;

class Watch {
	public:
		Watch() : m_min(0.0), m_sec(0.0) {}
		Watch run();
		// 前置++
		Watch operator++ ();
		// 后置++
		Watch operator++ (int s);
		friend ostream &operator<<(ostream &out, const Watch &w);
	private:
		float m_min;
		float m_sec;
};

Watch Watch::run()
{
	this->m_sec++;
	if (m_sec >= 60) {
		m_min ++;
		m_sec = 0;
	}
	return *this;
}

Watch Watch::operator++ ()
{
	run();
	return *this;
}

Watch Watch::operator++ (int s)
{		
	Watch w = *this;
	run();

	return w;
}

ostream &operator<<(ostream &out, const Watch &w)
{
	out << w.m_min << ":" << w.m_sec;
	return out;
}

int main(void)
{
	Watch w1, w2;

	cout << w1 << endl;	
	w2 = w1++;
	cout << w1 << endl;
	cout << w2 << endl;

	w2 = ++w1;
	cout << w1 << endl;
	cout << w2 << endl;

	return 0;
}

